import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const timeStamp = 'token_timestamp'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 获取时间戳
export function getTime() {
  return Cookies.get(timeStamp)
}

// 保存当前时间戳
export function setTime() {
  return Cookies.set(timeStamp, Date.now())
}
